home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / demos / lotorg.zip / DEMOBILD.BAT next >
DOS Batch File  |  1992-08-28  |  11KB  |  339 lines

  1. ECHO OFF
  2. CLS
  3. IF %1.== . GOTO :NODRV
  4.  
  5. ECHO.
  6. ECHO    DEMOBILD will UNZIP the demo's files onto diskettes.  You will then install
  7. ECHO the demo on your system from the diskettes just as if you had received it from
  8. ECHO the vendor.
  9. ECHO.
  10. ECHO.
  11. PAUSE
  12. IF NOT EXIST %1.ZIP GOTO :NODRV
  13. IF %2.==a:. GOTO :AENV
  14. IF %2.==A:. GOTO :AENV
  15. IF %2.==b:. GOTO :BENV
  16. IF %2.==B:. GOTO :BENV
  17. GOTO :NODRV
  18. :AENV
  19. SET DR=A
  20. GOTO :BEGIN
  21. :BENV
  22. SET DR=B
  23. GOTO :BEGIN
  24. :BEGIN
  25. CLS
  26. ECHO -----------------------------------------------------------------------------
  27. TYPE %1.INF
  28. ECHO -----------------------------------------------------------------------------
  29. ECHO.
  30. IF NOT EXIST DISK2.ZIP GOTO :NO_OLD_STUFF
  31. ECHO   Please be sure that the number of disks required in Step One above matches
  32. ECHO the number of DISKx.ZIP files found on your system (shown below).
  33. ECHO 
  34. DIR | FIND "DISK" > DEMOBILD.$$$
  35. TYPE DEMOBILD.$$$ | FIND "ZIP"
  36. DEL DEMOBILD.$$$
  37. ECHO 
  38. ECHO   If these don't match, there are probably DISKx.ZIP files left over from a
  39. ECHO previous demo.  If they don't match, press Ctrl-C now and remove those files.
  40. ECHO If they do match, you may continue...
  41. ECHO 
  42. PAUSE
  43.  
  44. :NO_OLD_STUFF
  45. REM ===================================================================  DISK 1
  46. CLS
  47. ECHO -----------------------------------------------------------------------------
  48. TYPE %1.INF
  49. ECHO -----------------------------------------------------------------------------
  50. ECHO.
  51. ECHO   You are about to create a disk which contains the %1 demo.  After you've
  52. ECHO done this you'll be able to run the demo from the disk or install it on your
  53. ECHO hard disk and run it from there.
  54. ECHO.
  55. ECHO   The minimum diskette capacity required is shown above.  You may use a larger
  56. ECHO capacity diskette if desired.
  57. ECHO.
  58. ECHO.
  59. ECHO Put a formatted, blank diskette in drive %2    -- (Ctrl-C to quit.)
  60. :DISK1_PAUSE
  61. ECHO.
  62. PAUSE
  63. IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank   (Ctrl-C to quit)
  64. IF EXIST %2*.* GOTO :DISK1_PAUSE
  65. PKUNZIP -d -$%DR% -JRHS DISK1 %2\
  66. IF ERRORLEVEL 1 GOTO :ZIP_ERROR
  67. ECHO.
  68. ECHO.
  69. PAUSE
  70.  
  71. REM ===================================================================  DISK 2
  72. IF NOT EXIST DISK2.ZIP GOTO :STEP_2
  73. CLS
  74. ECHO -----------------------------------------------------------------------------
  75. TYPE %1.INF
  76. ECHO -----------------------------------------------------------------------------
  77. ECHO.
  78. ECHO   You are now creating a second %1 demo disk.  When you're finished you'll
  79. ECHO be able to run the demo from the disk or install it on your hard disk and
  80. ECHO run it from there.
  81. ECHO.
  82. ECHO   The minimum diskette capacity required is shown above.  You may use a larger
  83. ECHO capacity diskette if desired.
  84. ECHO.
  85. ECHO.
  86. ECHO Put a second blank diskette in drive %2    -- (Ctrl-C to quit.)
  87. :DISK2_PAUSE
  88. ECHO.
  89. PAUSE
  90. IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank   (Ctrl-C to quit)
  91. IF EXIST %2*.* GOTO :DISK2_PAUSE
  92. PKUNZIP -d -$%DR% -JRHS DISK2 %2\
  93. IF ERRORLEVEL 1 GOTO :ZIP_ERROR
  94. ECHO.
  95. ECHO.
  96. PAUSE
  97.  
  98. REM ===================================================================  DISK 3
  99. IF NOT EXIST DISK3.ZIP GOTO :STEP_2
  100. CLS
  101. ECHO -----------------------------------------------------------------------------
  102. TYPE %1.INF
  103. ECHO -----------------------------------------------------------------------------
  104. ECHO.
  105. ECHO   You are now creating the third %1 demo disk.  When you're finished you'll
  106. ECHO be able to run the demo from the disk or install it on your hard disk and
  107. ECHO run it from there.
  108. ECHO.
  109. ECHO   The minimum diskette capacity required is shown above.  You may use a larger
  110. ECHO capacity diskette if desired.
  111. ECHO.
  112. ECHO.
  113. ECHO Put a third blank diskette in drive %2    -- (Ctrl-C to quit.)
  114. :DISK3_PAUSE
  115. ECHO.
  116. PAUSE
  117. IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank   (Ctrl-C to quit)
  118. IF EXIST %2*.* GOTO :DISK3_PAUSE
  119. PKUNZIP -d -$%DR% -JRHS DISK3 %2\
  120. IF ERRORLEVEL 1 GOTO :ZIP_ERROR
  121. ECHO.
  122. ECHO.
  123. PAUSE
  124.  
  125. REM ===================================================================  DISK 4
  126. IF NOT EXIST DISK4.ZIP GOTO :STEP_2
  127. CLS
  128. ECHO -----------------------------------------------------------------------------
  129. TYPE %1.INF
  130. ECHO -----------------------------------------------------------------------------
  131. ECHO.
  132. ECHO   You are now creating the fourth %1 demo disk. When you're finished you'll
  133. ECHO be able to run the demo from the disk or install it on your hard disk and
  134. ECHO run it from there.
  135. ECHO.
  136. ECHO   The minimum diskette capacity required is shown above.  You may use a larger
  137. ECHO capacity diskette if desired.
  138. ECHO.
  139. ECHO.
  140. ECHO Put a fourth blank diskette in drive %2   -- (Ctrl-C to quit.)
  141. :DISK4_PAUSE
  142. ECHO.
  143. PAUSE
  144. IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank   (Ctrl-C to quit)
  145. IF EXIST %2*.* GOTO :DISK4_PAUSE
  146. PKUNZIP -d -$%DR% -JRHS DISK4 %2\
  147. IF ERRORLEVEL 1 GOTO :ZIP_ERROR
  148. ECHO.
  149. ECHO.
  150. PAUSE
  151.  
  152. REM ===================================================================  DISK 5
  153. IF NOT EXIST DISK5.ZIP GOTO :STEP_2
  154. CLS
  155. ECHO -----------------------------------------------------------------------------
  156. TYPE %1.INF
  157. ECHO -----------------------------------------------------------------------------
  158. ECHO.
  159. ECHO   You are now creating the fifth %1 demo disk.  When you're finished you'll
  160. ECHO be able to run the demo from the disk or install it on your hard disk and
  161. ECHO run it from there.
  162. ECHO.
  163. ECHO   The minimum diskette capacity required is shown above.  You may use a larger
  164. ECHO capacity diskette if desired.
  165. ECHO.
  166. ECHO.
  167. ECHO Put a fifth blank diskette in drive %2    -- (Ctrl-C to quit.)
  168. :DISK5_PAUSE
  169. ECHO.
  170. PAUSE
  171. IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank   (Ctrl-C to quit)
  172. IF EXIST %2*.* GOTO :DISK5_PAUSE
  173. PKUNZIP -d -$%DR% -JRHS DISK5 %2\
  174. IF ERRORLEVEL 1 GOTO :ZIP_ERROR
  175. ECHO.
  176. ECHO.
  177. PAUSE
  178.  
  179. REM ===================================================================  DISK 6
  180. IF NOT EXIST DISK6.ZIP GOTO :STEP_2
  181. CLS
  182. ECHO -----------------------------------------------------------------------------
  183. TYPE %1.INF
  184. ECHO -----------------------------------------------------------------------------
  185. ECHO.
  186. ECHO   You are now creating the sixth %1 demo disk.  When you're finished you'll
  187. ECHO be able to run the demo from the disk or install it on your hard disk and
  188. ECHO run it from there.
  189. ECHO.
  190. ECHO   The minimum diskette capacity required is shown above.  You may use a larger
  191. ECHO capacity diskette if desired.
  192. ECHO.
  193. ECHO.
  194. ECHO Put a sixth blank diskette in drive %2    -- (Ctrl-C to quit.)
  195. :DISK6_PAUSE
  196. ECHO.
  197. PAUSE
  198. IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank   (Ctrl-C to quit)
  199. IF EXIST %2*.* GOTO :DISK6_PAUSE
  200. PKUNZIP -d -$%DR% -JRHS DISK6 %2\
  201. IF ERRORLEVEL 1 GOTO :ZIP_ERROR
  202. ECHO.
  203. ECHO.
  204. PAUSE
  205.  
  206. REM ===================================================================  DISK 7
  207. IF NOT EXIST DISK7.ZIP GOTO :STEP_2
  208. CLS
  209. ECHO -----------------------------------------------------------------------------
  210. TYPE %1.INF
  211. ECHO -----------------------------------------------------------------------------
  212. ECHO.
  213. ECHO   You are now creating the seventh %1 demo disk. When you're finished you'll
  214. ECHO be able to run the demo from the disk or install it on your hard disk and
  215. ECHO run it from there.
  216. ECHO.
  217. ECHO   The minimum diskette capacity required is shown above.  You may use a larger
  218. ECHO capacity diskette if desired.
  219. ECHO.
  220. ECHO.
  221. ECHO Put a seventh blank diskette in drive %2  -- (Ctrl-C to quit.)
  222. :DISK7_PAUSE
  223. ECHO.
  224. PAUSE
  225. IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank   (Ctrl-C to quit)
  226. IF EXIST %2*.* GOTO :DISK7_PAUSE
  227. PKUNZIP -d -$%DR% -JRHS DISK7 %2\
  228. IF ERRORLEVEL 1 GOTO :ZIP_ERROR
  229. ECHO.
  230. ECHO.
  231. PAUSE
  232.  
  233. REM ===================================================================  DISK 8
  234. IF NOT EXIST DISK8.ZIP GOTO :STEP_2
  235. CLS
  236. ECHO -----------------------------------------------------------------------------
  237. TYPE %1.INF
  238. ECHO -----------------------------------------------------------------------------
  239. ECHO.
  240. ECHO   You are now creating the eighth %1 demo disk.  When you're finished you'll
  241. ECHO be able to run the demo from the disk or install it on your hard disk and
  242. ECHO run it from there.
  243. ECHO.
  244. ECHO   The minimum diskette capacity required is shown above.  You may use a larger
  245. ECHO capacity diskette if desired.
  246. ECHO.
  247. ECHO.
  248. ECHO Put a eighth blank diskette in drive %2   -- (Ctrl-C to quit.)
  249. :DISK8_PAUSE
  250. ECHO.
  251. PAUSE
  252. IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank   (Ctrl-C to quit)
  253. IF EXIST %2*.* GOTO :DISK8_PAUSE
  254. PKUNZIP -d -$%DR% -JRHS DISK8 %2\
  255. IF ERRORLEVEL 1 GOTO :ZIP_ERROR
  256. ECHO.
  257. ECHO.
  258. PAUSE
  259.  
  260. REM ===================================================================  DISK 9
  261. IF NOT EXIST DISK9.ZIP GOTO :STEP_2
  262. CLS
  263. ECHO -----------------------------------------------------------------------------
  264. TYPE %1.INF
  265. ECHO -----------------------------------------------------------------------------
  266. ECHO.
  267. ECHO   You are now creating the ninth %1 demo disk.  When you're finished you'll
  268. ECHO be able to run the demo from the disk or install it on your hard disk and
  269. ECHO run it from there.
  270. ECHO.
  271. ECHO   The minimum diskette capacity required is shown above.  You may use a larger
  272. ECHO capacity diskette if desired.
  273. ECHO.
  274. ECHO.
  275. ECHO Put a ninth blank diskette in drive %2   -- (Ctrl-C to quit.)
  276. :DISK9_PAUSE
  277. ECHO.
  278. PAUSE
  279. IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank   (Ctrl-C to quit)
  280. IF EXIST %2*.* GOTO :DISK9_PAUSE
  281. PKUNZIP -d -$%DR% -JRHS DISK9 %2\
  282. IF ERRORLEVEL 1 GOTO :ZIP_ERROR
  283. ECHO.
  284. ECHO.
  285. PAUSE
  286.  
  287.  
  288. :STEP_2
  289. CLS
  290. ECHO ------------------------  Step One has been completed  -----------------------
  291. TYPE %1.INF
  292. ECHO -----------------------------------------------------------------------------
  293. ECHO.
  294. ECHO.
  295. ECHO ===  To complete the installation follow the directions for Step Two above  ===
  296. ECHO.
  297. ECHO.
  298. ECHO.
  299. ECHO.
  300. ECHO.
  301. ECHO.
  302. GOTO :END
  303.  
  304.  
  305. REM ==== Error messages and exit below ======================================
  306.  
  307. :ZIP_ERROR
  308. ECHO 
  309. ECHO 
  310. ECHO   *****  Error reading zip file  *****
  311. ECHO 
  312. ECHO 
  313. GOTO :END
  314.  
  315. :NODRV
  316. ECHO.
  317. ECHO.
  318. ECHO You need to specify the name of the demo and specify which diskette drive
  319. ECHO you want to use when creating the demo diskettes.
  320. ECHO.
  321. ECHO     SYNTAX:   DEMOBILD  demo-name  drive:    (the colon is required)
  322. ECHO.
  323. ECHO.
  324. IF %1. ==. GOTO :END
  325. IF %2.==a. ECHO  ** The colon, remember the colon!
  326. IF %2.==A. ECHO  ** The colon, remember the colon!
  327. IF %2.==b. ECHO  ** The colon, remember the colon!
  328. IF %2.==B. ECHO  ** The colon, remember the colon!
  329. IF NOT EXIST %1.ZIP ECHO  ** Can't find the demo file: %1.ZIP
  330. ECHO.
  331. ECHO.
  332. ECHO.
  333. REM ---- The following echo sounds a beep
  334. ECHO 
  335. GOTO :END
  336.  
  337.  
  338. :END
  339.